package edu.uta.cfl.GUI;

import java.util.ArrayList;

import edu.uta.cfl.data.IterationResult;
import edu.uta.cfl.data.SUT;

/**
 * This class will generate the recommended test set
 * return the result in an arraylist
 * @author jagan
 *
 */
public class LoadRecommendedTestSet {
	private IterationResult iteration;
	private ArrayList<String> recommendedTestSet = new ArrayList<String>();
	private SUT sut;

	public LoadRecommendedTestSet(IterationResult iteration,SUT sut) {
		super();
		this.iteration = iteration;
		this.sut = sut;
	}

	public ArrayList<String> getRecommendedTestSet()
	{
		int stater=1;
		int i;
		String test;
		for (int[] tc : iteration.getTestSet()) {
			test = "" + stater++ + " , ";
			for (i = 0; i < tc.length - 1; i++)
				test += sut.getParameters().get(i).getValues().get(tc[i]) + " , ";

			test += tc[tc.length - 1];
			System.out.println("RTS :"+test);
			recommendedTestSet.add(test);

		}
		return recommendedTestSet;

	}


}
